import request from '@/utils/request'

export function getChannels(query) {
  return request({
    url: '/customer/channel/getList',
    method: 'post',
    data: query
  })
}

export function getChannel(id) {
  return request({
    url: '/customer/channel/getDetail',
    method: 'post',
    data: id
  })
}

export function saveChannel(id) {
  return request({
    url: '/customer/channel/save',
    method: 'post',
    data: id
  })
}

export function removeChannelByID(id) {
  return request({
    url: '/customer/channel/remove',
    method: 'post',
    data: id
  })
}

export function changeStatusByChannelID(formdata) {
  return request({
    url: '/customer/channel/change-status',
    method: 'post',
    data: formdata
  })
}

export function getChannelAvabile(query) {
  return request({
    url: '/customer/channel/getList',
    method: 'post',
    data: query
  })
}

